package com.swpu.zdl.service.impl;

import com.swpu.zdl.mapper.TeacherMapper;
import com.swpu.zdl.pojo.Teacher;
import com.swpu.zdl.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper teacherMapper;

    @Override
    public List<Teacher> getAll() {
        return teacherMapper.getAll();
    }

    @Override
    public boolean addTeacher(Teacher teacher) {
        return teacherMapper.addTeacher(teacher);
    }

    @Override
    public boolean deleteTeacher(String gongHao) {
        return teacherMapper.deleteTeacher(gongHao);
    }

    @Override
    public boolean updateTeacher(String gongHao, Teacher teacher) {
        return teacherMapper.updateTeacher(gongHao, teacher);
    }

    @Override
    public Teacher getTeacherKp(String gongHao) {
        return teacherMapper.getTeacherKp(gongHao);
    }
}
